# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=scap-workbench
pkgver=1.2.1
pkgrel=2
pkgdesc="SCAP Scanner And Tailoring Graphical User Interface"
url="https://www.open-scap.org/tools/scap-workbench/"
arch="all !armhf"
license="GPL-3.0-or-later"
depends="openssh-askpass util-linux openssh-client polkit"
makedepends="
	asciidoc
	cmake
	libxslt
	openscap-dev
	qt5-qtbase-dev
	qt5-qtxmlpatterns-dev
	samurai
	"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/OpenSCAP/scap-workbench/archive/$pkgver.tar.gz
	appdata.patch
	remove-werror-cxx-flags.patch
	"
options="!check" # todo

build() {
	cmake -B build -G Ninja \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_BUILD_TYPE=none
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
37dad3d3310a9ba200756480eee2c93913617a77e9983c18dafdc3320fc62774d23b327200fa21f63cec160ef8d6527ac43c11e7d0cdce49b3a364590311fbad  scap-workbench-1.2.1.tar.gz
b2bf0e1cca3f30f4cacf5f584a6e4958077e2907a3821ea98064d6174322d66ad163fc2708adca167db94454246f39bcf8c444074d4ed70a6739ee7af47b8597  appdata.patch
7434322c26be306f2c73ccf864846f8d8f8857a4def784b7c67c9613010f0ffdefad3a360d86b1945d3e77d1a197e657d1b3a71c9f73d3bee98d1bccb7021c9e  remove-werror-cxx-flags.patch
"
